using System.Data.Entity;
using System.Data.Entity.Infrastructure;
using GodSoft.Models.Mapping;

namespace GodSoft.Models
{
    public partial class GodSoftContext : DbContext
    {
        static GodSoftContext()
        {
            Database.SetInitializer<GodSoftContext>(null);
        }

        public GodSoftContext()
            : base("Name=GodSoftContext")
        {
        }

        public DbSet<ActionInfo> ActionInfoes { get; set; }
        public DbSet<Collector> Collectors { get; set; }
        public DbSet<DeviceType> DeviceTypes { get; set; }
        public DbSet<LampController> LampControllers { get; set; }
        public DbSet<Light> Lights { get; set; }
        public DbSet<Role> Roles { get; set; }
        public DbSet<sysdiagram> sysdiagrams { get; set; }
        public DbSet<UserInfo> UserInfoes { get; set; }

        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            modelBuilder.Configurations.Add(new ActionInfoMap());
            modelBuilder.Configurations.Add(new CollectorMap());
            modelBuilder.Configurations.Add(new DeviceTypeMap());
            modelBuilder.Configurations.Add(new LampControllerMap());
            modelBuilder.Configurations.Add(new LightMap());
            modelBuilder.Configurations.Add(new RoleMap());
            modelBuilder.Configurations.Add(new sysdiagramMap());
            modelBuilder.Configurations.Add(new UserInfoMap());
        }
    }
}
